<template>
	<!-- 文章 -->
	<view v-if="aAct.length>0">

		<view class="cu-card article no-card" v-for="(item, index) in aAct" :key="index">
			<view class="cu-item shadow" @tap="toActDetail" :data-id="item._id" style="border-bottom: 1Px solid rgba(0,0,0,0.1);">
				<view class="title">
					<view class="text-cut">{{item.name}}</view>
				</view>
				<view class="content">
					<image :src="item.picture[0] ? item.picture[0]: 'https://xtspace.cn/xcx/sys/noup.png'"></image>
					<view class="desc">
						<view class="text-content">
							<text class="cuIcon-profile margin-lr-xs"></text>
							{{item.createBy}}</view>
						<view class="text-content">
							<text class="cuIcon-countdownfill margin-lr-xs"></text>
							{{item.createTime | dateform}}</view>
						<view class="text-content">
							<text class="cuIcon-location margin-lr-xs"></text>
							{{item.site}}
						</view>
						<view>
							<view class="cu-tag bg-red light sm round">积分:{{item.integral}}分</view>
							<view class="cu-tag bg-green light sm round">需求:{{item.peoplenum}}人</view>
							<view class="cu-tag bg-cyan light sm round">剩余名额:{{item.peoplenum - item.signup.length}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		name: 'h-card',
		data() {
			return {
			
			}
		},
		props: {
			aAct: {
				type: Array,
				required: true
			}
		},
		methods: {
			toActDetail(e) {
				 uni.navigateTo({
				  url: '/pages/home/act-detail?id='+e.currentTarget.dataset.id,
				})
			}
		},
		
		mounted() {
			
		}
	}
</script>

<style>
	.cu-card.article>.cu-item .content .text-content {
		height: auto;
	}
</style>
